package com.cross.test;

import java.io.File;

import org.dom4j.DocumentException;

import com.cross.core.Reader;
import com.cross.core.SimpleTractor;
import com.cross.core.Tractor;
import com.cross.core.Writer;
import com.cross.excel.SimpleExcelReader;
import com.cross.excel.SimpleExcelWriter;
import com.cross.xml.SimpleXmlReader;
import com.cross.xml.SimpleXmlWriter;

public class SimpleExcelWriterTestCase {

	
	public static void main(String[] args){
		try {
			Reader reader = new SimpleXmlReader(new File("d:/test/test.xml"));
			Writer writer = new SimpleExcelWriter(reader.getHeader(), "d://test/test.xls");
			Tractor tractor = new SimpleTractor(reader, writer);
			tractor.start();
			
			
			reader = new SimpleExcelReader(new File("d:/test/test.xls"));
			writer = new SimpleXmlWriter(reader.getHeader(), new File("d://test/test_1.xml"));
			tractor = new SimpleTractor(reader, writer);
			tractor.start();
		} catch (DocumentException e) {
			e.printStackTrace();
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	}
}
